package com.top10.service.impl;

import com.top10.entity.TbComment;
import com.top10.entity.vo.TbCommentVo;
import com.top10.mapper.TbCommentMapper;
import com.top10.service.CommentService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

	@Autowired
	private TbCommentMapper commentMapper;
	@Override
	public Integer insert(TbComment comment)throws Exception{
       return commentMapper.insertOne(comment);
	}
	@Override
	public String getUUid(String goodsUuid)throws Exception{
		return  commentMapper.select(goodsUuid);
	}
	@Override
	public List<TbCommentVo> selectAll(TbComment tbComment)throws Exception{
		return commentMapper.selectAll(tbComment);
	}

	@Override
	public  List<TbCommentVo> selectImage(String goods_uuid)throws Exception{
	        return  commentMapper.selectImage(goods_uuid);
	}
	@Override
	public Integer Count(String goods_uuid)throws Exception{
		return commentMapper.Count(goods_uuid);
	}
	@Override
	public TbCommentVo selectAllOne(String goods_uuid)throws Exception{
		return commentMapper.selectAllOne(goods_uuid);
	}
}
